#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   v1_router.py
@Time    :   2021/02/05 21:47:12
@Author  :   superjin
@Version :   1.0
'''

from api.v1.auth import router as auth_router
from api.v1.classroom import router as classroom_router
from api.v1.user import router as user_router
from api.v1.reservation import router as reservation_router
from api.v1.participant import router as participant_router
from api.v1.file import router as file_router
from api.v1.system.api import router as system_router
from api.v1.xclass import router as xclass_router
from api.v1.course import router as course_router
from fastapi import APIRouter, Depends
from common.deps import check_jwt_token, check_authority

api_v1_router = APIRouter()

api_v1_router.include_router(
    auth_router, prefix="/api/v1/user", tags=["Auth"])

api_v1_router.include_router(user_router, prefix="/api/v1/user", tags=["User"],
                             dependencies=[Depends(check_jwt_token)])
api_v1_router.include_router(classroom_router, prefix="/api/v1/classroom", tags=["Classroom"],
                             dependencies=[Depends(check_jwt_token)])
api_v1_router.include_router(reservation_router, prefix="/api/v1/reservation", tags=["Reservation"],
                             dependencies=[Depends(check_jwt_token)])
api_v1_router.include_router(participant_router, prefix="/api/v1/participant", tags=["Participant"],
                             dependencies=[Depends(check_jwt_token)])
api_v1_router.include_router(system_router, prefix="/api/v1/system", tags=["System"],
                             dependencies=[Depends(check_authority)])
api_v1_router.include_router(file_router, prefix="/api/v1/file",
                             tags=["File"])
api_v1_router.include_router(xclass_router, prefix="/api/v1/xclass",tags=["XClass"],
                             dependencies=[Depends(check_jwt_token)])
api_v1_router.include_router(course_router, prefix="/api/v1/course",tags=["Course"],
                             dependencies=[Depends(check_jwt_token)])

